home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 46 / Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso / -serious- / programming / other / tandem / projects / asmfiles / test13.asm < prev    next >
Assembly Source File  |  1999-09-06  |  1KB  |  56 lines

  1. * test finding of 680x0/68881 instructions
  2.  
  3. * 68000 all ok
  4.  
  5.  move ccr,d0
  6.  move d0,ccr
  7.  andi #20,ccr
  8.  eori #20,ccr
  9.  ori #20,ccr
  10.  
  11. * effectively priveleged - cause trap, or not used in Amiga
  12. * ctrl/p finds all of these
  13.  
  14.  bkpt #7       ;(0)
  15.  chk (a0),d0   ;(1)
  16.  chk2 (a0),d0  ;(2)
  17.  illegal       ;(3)
  18.  trap #3       ;(4)
  19.  trapcc #4     ;(5)
  20.  trapv         ;(6)
  21.  tas (a0)      ;(7) ;do not use in Amiga
  22.  
  23. * priveleged instructions
  24.  
  25.  andi #20,sr   ;1
  26.  eori #20,sr   ;2
  27.  move d0,sr    ;3
  28.  move sr,d0    ;4  strictly, not priv in 68000, but treat as priv
  29.  move usp,a1   ;5
  30.  move a1,usp   ;6
  31.  movec a0,sfc  ;7
  32.  movec sfc,a0  ;8
  33.  moves d0,(a0) ;9
  34.  moves (a0),d0 ;10
  35.  ori #20,sr    ;11
  36.  reset         ;12
  37.  rte           ;13
  38.  stop #5       ;14
  39.  
  40. * MMU opcodes (n.b. Tandem does not assemble CALLM,RTM - 68020 only)
  41.  
  42.  pflush #7,#7        ;15
  43.  pflusha             ;16
  44.  ploadr #0,(a0)      ;17
  45.  ploadw #0,(a0)      ;18
  46.  pmove.d crp,(a0)    ;19
  47.  pmovefd.d (a0),crp  ;20
  48.  ptestr #0,(a5),#7   ;21
  49.  ptestw #0,(a5),#7   ;22
  50.  
  51. * 68881 priveleged/exception causing opcodes
  52.  
  53.  frestore (a0)  ;23
  54.  fsave (a0)     ;24
  55.  ftrapeq        ;25
  56.